<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ page import="com.gouwudai.gobbs.pojo.TbbsRegCounter,com.gouwudai.gobbs.pojo.TbbsAffiche,com.gouwudai.gobbs.pojo.TbbsTopic" %>
<%@ include file="../common/common.jsp" %>
<%
IRegCounterService regCounterService = (IRegCounterService)BeanManager.getBean("regCounterService");
regCounterService.updateHits();
TbbsRegCounter tbbsRegCounter = regCounterService.loadTodayCounterInfo();

ITopicService topicService = (ITopicService)BeanManager.getBean("topicService");
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=SYSTITLE%> - 进站画面</title>
<meta name="Keywords" content="<%=SYSMETAKEY%>" />
<meta name="Description" content="<%=SYSMETADESC%>" />
<%@ include file="../common/meta.inc" %>
<link rel="stylesheet" type="text/css" href="css/defaultStyle.css" >
<script language="javascript" type="text/javascript" src="scripts/showMenu.js"></script>
<script language="javascript" type="text/javascript" src="scripts/linkPlus.js"></script>
<script language="javascript" type="text/javascript" src="scripts/marquee.js"></script>
</head>
<body>
<%@ include file="../common/waiting.inc" %>
<SCRIPT language="javascript">

setStatus('<%=SYSTITLE%> - 首页');
</SCRIPT>
<script language="javascript" type="text/javascript" src="template/scripts/topBar.js"></script>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
<tr><td><img src="images/mainLogo.gif" /></td>
<td align="left"></td></tr></table>
<table width="100%" height="86" border="0" align="center" cellpadding="6" cellspacing="1" class="tab">
<tr class="tab3">
<td width="50%" valign="top">
<iframe src="user_login_iframe.jsp" width="100%" height="86" hspace="0" vspace="0" frameborder="0" scrolling="no"  allowTransparency="true">用户登陆</iframe>
</td><td valign="top">
社区共有注册用户<strong><%=tbbsRegCounter.getTotalBoy().intValue()+tbbsRegCounter.getTotalGirl().intValue()+tbbsRegCounter.getTotalSecret().intValue() %></strong>
&nbsp;&nbsp;最新登记『<span style="color:#bb0000"><%=Utility.trimNull(tbbsRegCounter.getLaterestUser()) %></span>』<br />
共有帖子&nbsp;<strong><%=tbbsRegCounter.getTotalTopic().intValue()+tbbsRegCounter.getTotalReply().intValue() %></strong>&nbsp;篇
&nbsp;&nbsp;其中主题&nbsp;<strong><%=tbbsRegCounter.getTotalTopic() %></strong>&nbsp;篇<br />
今日发帖&nbsp;<strong><%=tbbsRegCounter.getTodayTopic().intValue()+ tbbsRegCounter.getTodayReply().intValue()%></strong>&nbsp;篇
&nbsp;&nbsp;昨日发帖&nbsp;<strong><%=tbbsRegCounter.getYesterTopic().intValue()+ tbbsRegCounter.getYesterReply().intValue()%></strong>&nbsp;篇
<br />当前在线&nbsp;<strong><%=com.gouwudai.gobbs.listener.OnlineUserListener.getCurrentOnline()%></strong>&nbsp;人
&nbsp;&nbsp;历史最高在线&nbsp;<strong><%=com.gouwudai.gobbs.listener.OnlineUserListener.getMostOnline() %>&nbsp;人</strong>
</td></tr></table>
<DIV class="list_tab_0">
	<DIV id="div_2Right_bg">
		<img src="images/topicPro/hot.gif" align="absmiddle" onmouseover="tooltip.fadeOn();"/><strong>精品主题</strong>
	</DIV>
	<DIV id="div_2Left_bg">
		<img src="images/affiche.gif" align="absmiddle" /><strong>社区公告</strong>
	</DIV>
</DIV>
<DIV id="div_2Right_cl">
	<%//查询属性为精品的主题
	List bestTopicList = topicService.listByPro(new Integer(3),5);
	TbbsTopic tbbsTopic = null;
	for(int i=0;i<bestTopicList.size();i++) {
		tbbsTopic = (TbbsTopic)bestTopicList.get(i);		
	%>	
	<DIV class="list_topic">
		<%=Arguments.getTopicMoodDisplay(tbbsTopic.getTopicMood())%>
		<%=Arguments.getTopicLink(tbbsTopic.getClassId().intValue(),tbbsTopic.getTopicId().intValue(),tbbsTopic.getTopicPro().intValue(),tbbsTopic.getTitle(),tbbsTopic.getTopicStyleList(),tbbsTopic.getTopicIsDel().booleanValue(),20,1) %>
	</DIV>
	<%}%>	
</DIV>	
<DIV id="div_2Left_cl">
	<div id="marqueeBar" class="marqueeBar">
		<ul>	
		<%
			IAfficheService afficheService = (IAfficheService)BeanManager.getBean("afficheService");
			List afficheList = afficheService.list(1,9);
			TbbsAffiche affiche = null;
			for(int i=0;i<afficheList.size();i++) {
				affiche = (TbbsAffiche)afficheList.get(i);
		%>		
			<li><img src='images/notice.gif' align='absmiddle'>&nbsp;<%=Arguments.getAfficheLink(affiche.getAffId(),affiche.getTitle()) %></li>
		<%}%>
		</ul>	
	</div>
<script type="text/javascript">
var marqueeBar = new marqueeBarVO("marqueeBar",3);	 //创建对象
marqueeBar.initMarquee();	
</script>
</DIV>	
<DIV class="line"></DIV>
<DIV class="list_tab_0">
	<DIV class="list_left_1"><span class="text_bold">版面</span></DIV>
	<DIV class="list_r_2">
		<DIV class="vertical"></DIV>
		<DIV class="list_3"><span class="text_bold">作者</span></DIV>
		<DIV class="list_none"><span class="text_bold">类型</span></DIV>
	</DIV>
	<DIV class="list_center"><span class="text_bold">主题</span></DIV>
</DIV>
<%
List topicList = topicService.listTop10();
Map topicMap = null;
for(int i=0;i<topicList.size();i++) {
	topicMap = (Map)topicList.get(i);
%>
<DIV class="list_tab_1">
	<DIV class="list_left_1">	
	<%=Arguments.getClassLink(ParamUtils.getMapToInt(topicMap,"CLASS_ID"),ParamUtils.getMapToString(topicMap,"CLASS_NAME"))%>
	</DIV>
	<DIV class="list_r_2">
		<DIV class="vertical"></DIV>
		<DIV class="list_3"><%=Arguments.getUserInfoLink(ParamUtils.getMapToInt(topicMap,"USER_ID"),ParamUtils.getMapToString(topicMap,"LOGIN_ID")) %></DIV>
		<DIV class="list_none"><%=Arguments.getTopicTypeDisplay(ParamUtils.getMapToInt(topicMap,"TOPIC_TYPE"),ParamUtils.getMapToBigDecimal(topicMap,"TOPIC_TYPE_NUM"))%></DIV>
	</DIV>
	<DIV class="list_img_right"><%=Arguments.getTopicHotDisplay(SYSINFO.getIsHottopic().intValue(),SYSINFO.getIsHotre().intValue(),ParamUtils.getMapToInt(topicMap,"TOPIC_VIEW_COUNT"),ParamUtils.getMapToInt(topicMap,"TOPIC_RE_COUNT")) %></DIV>
	<DIV class="list_topic">
	<%=Arguments.getTopicMoodDisplay(ParamUtils.getMapToInt(topicMap,"TOPIC_MOOD")) %>
	<%=Arguments.getTopicLink(ParamUtils.getMapToInt(topicMap,"CLASS_ID"),ParamUtils.getMapToInt(topicMap,"TOPIC_ID"),ParamUtils.getMapToInt(topicMap,"TOPIC_PRO"),ParamUtils.getMapToString(topicMap,"TITLE"),ParamUtils.getMapToString(topicMap,"TOPIC_STYLE_LIST"),ParamUtils.getMapToBoolean(topicMap,"TOPIC_IS_DEL"),100,1) %>
	</DIV>			
</DIV>
<%} %>
<script language="javascript" type="text/javascript" src="template/scripts/links.js"></script>
<%=COPYRIGHTFOOT%>
<%@ include file="../common/foot.inc"%>
</body>
</html>